% Script to run the saccade experiment

clear classes

Exp = ET_LUMINANCE();

% Screen size
%--------------------------------------------------------------------------
% Exp.scn.w = 1680;
% Exp.scn.h = 1050;
% Exp.scn.wcm  = 47.7;
% Exp.scn.hcb = 29.8;
% Exp.scn.dist = 61;
% Exp.scn.mon = 0;

Exp.ff = 2;

Exp.scn.w = 1920;
Exp.scn.h = 1200;
Exp.scn.wcm  = 52;
Exp.scn.hcb = 32.5;
Exp.scn.mon = 0;
Exp.scn.refresh_rate = 60.146306;


%Exp.new_clut = [[0 linspace(0.3,0.5,254) 1 ];linspace(0,1,256);linspace(0,1,256)]';
Exp.new_clut = [linspace(0,1,256);linspace(0,1,256);linspace(0,1,256)]';

Exp.fix.w = 4;
Exp.fix.h = 4;

Exp.fix.rcolor = [ 0 50 0];
Exp.fix.vcolor = [58 0 0];

try 
    Exp.runScreen()
    fprintf(1,'Reference color: %d %d %d\n',Exp.fix.rcolor);
    fprintf(1,'Final color: %d %d %d\n',Exp.bh_r);
catch Err
    Exp.exit();
    rethrow(Err)
end

